<template>
  <el-row :gutter="20" class="panel-group">
    <el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
      <div class="card-panel" @click="order_publish">
        <div class="card-panel-icon-wrapper icon-huoyuan">
          <svg-icon icon-class="huoyuan" class-name="card-panel-icon" />
        </div>
        <div class="card-panel-description">
          <div class="card-panel-en">RELEASE SOURSE</div>
          <div class="card-panel-text">发布货源</div>
          <!-- <count-to :start-val="0" :end-val="102400" :duration="2600" class="card-panel-num" /> -->
        </div>
      </div>
    </el-col>
    <el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
      <div class="card-panel" @click="order_manage">
        <div class="card-panel-icon-wrapper icon-dingdanguanli">
          <svg-icon icon-class="dingdanguanli" class-name="card-panel-icon" />
        </div>
        <div class="card-panel-description">
          <div class="card-panel-en">ACCOUNT INFORMATION</div>
          <div class="card-panel-text">账户信息</div>
          <!-- <count-to :start-val="0" :end-val="81212" :duration="3000" class="card-panel-num" /> -->
        </div>
      </div>
    </el-col>
    <el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
      <div class="card-panel" @click="service_manage">
        <div class="card-panel-icon-wrapper icon-kefu">
          <svg-icon icon-class="kefu" class-name="card-panel-icon" style="font-size: 60px;" />
        </div>
        <div class="card-panel-description">
          <div class="card-panel-en">FREIGHT STATISTICS</div>
          <div class="card-panel-text">运费统计</div>
          <!-- <count-to :start-val="0" :end-val="9280" :duration="3200" class="card-panel-num" /> -->
        </div>
      </div>
    </el-col>
    <el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
      <a :href="url" target="_blank">
        <div class="card-panel">
          <div class="card-panel-icon-wrapper icon-dashuju">
            <svg-icon icon-class="dashuju" class-name="card-panel-icon" style="font-size: 68px;" />
          </div>
          <div class="card-panel-description">
            <div class="card-panel-en">CARRIER GROUPING</div>
            <div class="card-panel-text">承运分组</div>
            <!-- <count-to :start-val="0" :end-val="13600" :duration="3600" class="card-panel-num" /> -->
          </div>
        </div>
      </a>
    </el-col>
  </el-row>
</template>

<script>
import CountTo from "vue-count-to";

export default {
  components: {
    CountTo
  },
  data() {
    return{
      url: this.BASE_API_URL + "Bigdata/"
    }
  },
  methods: {
    // 发布货源
    order_publish() {
      this.$router.push({
        path: "/tms/order/order_publish"
      });
    },
    // 订单管理
    order_manage() {
      this.$router.push({
        path: "/tms/order/order_manage"
      });
    },
    // 客服管理
    service_manage() {
      this.$router.push({
        path: "tms/CustomerService/Complaint"
      });
    }
  }
};
</script>

<style lang="scss" scoped>
.panel-group {
  margin-top: 18px;

  // .card-panel-col {
  //   margin-bottom: 10px;
  // }
  .card-panel {
    padding: 0 30px 0 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
    height: 109px;
    cursor: pointer;
    font-size: 18px;
    position: relative;
    overflow: hidden;
    color: #666;
    background: #fff;
    border-color: rgba(0, 0, 0, 0.05);

    &:hover {
      .card-panel-icon-wrapper {
        color: #fff;
      }

      .icon-huoyuan {
        background: #36a3f7;
      }

      .icon-dingdanguanli {
        background: #40c9c6;
      }

      .icon-kefu {
        background: #ff477d;
      }

      .icon-dashuju {
        background: #34bfa3;
      }
    }

    .icon-huoyuan {
      color: #36a3f7;
    }

    .icon-dingdanguanli {
      color: #40c9c6;
    }

    .icon-kefu {
      color: #ff477d;
    }

    .icon-dashuju {
      color: #34bfa3;
    }

    .card-panel-description {
      // margin-top: 35px;
      // float: right;
      text-align: right;

      // margin: 26px;
      .card-panel-en {
        font-size: 12px;
      }

      .card-panel-text {
        margin-top: 14px;
        line-height: 18px;
        color: #333333;
        font-weight: 600;
        // margin-bottom: 12px;
      }

      .card-panel-num {
        font-size: 20px;
      }
    }
  }
  .card-panel:hover {
    box-shadow: 4px 4px 40px rgba(0, 0, 0, 0.05);
  }
}

@media (max-width: 550px) {
  .card-panel-description {
    display: none;
  }

  .card-panel-icon-wrapper {
    float: none !important;
    width: 100%;
    height: 100%;
    margin: 0 !important;

    .svg-icon {
      display: block;
      margin: 14px auto !important;
      float: none !important;
    }
  }
}

.card-panel-icon-wrapper {
  width: 80px;
  height: 80px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  transition: all 0.38s ease-out;
}

.card-panel-icon {
  float: left;
  font-size: 44px;
}
</style>
